using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._TopographicProductionTools._Workflow._Properties
{
    /// <summary>
    /// <para>Copy Extended Properties</para>
    /// <para>Copies extended property values from one job to another job in the same Workflow Manager (Classic) repository.</para>
    /// <para>将扩展属性值从一个作业复制到同一 Workflow Manager （Classic） 资料档案库中的另一个作业。</para>
    /// </summary>    
    [DisplayName("Copy Extended Properties")]
    public class CopyExtendedProperties : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CopyExtendedProperties()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_source_job_id">
        /// <para>Source Job ID</para>
        /// <para>The Job ID of the Workflow Manager (Classic) job that contains the properties to copy.</para>
        /// <para>包含要复制的属性的 Workflow Manager （Classic） 作业的作业 ID。</para>
        /// </param>
        /// <param name="_target_job_id">
        /// <para>Target Job ID</para>
        /// <para>The Job ID of the target job that will have its properties updated.</para>
        /// <para>将更新其属性的目标作业的作业 ID。</para>
        /// </param>
        /// <param name="_property_table_name">
        /// <para>Properties Table Name</para>
        /// <para>The name of the extended properties table that will be updated.</para>
        /// <para>将要更新的扩展属性表的名称。</para>
        /// </param>
        /// <param name="_property_fields">
        /// <para>Property Fields</para>
        /// <para>The properties to be copied from the source job to the target job.</para>
        /// <para>要从源作业复制到目标作业的属性。</para>
        /// </param>
        public CopyExtendedProperties(long? _source_job_id, long? _target_job_id, object _property_table_name, List<object> _property_fields)
        {
            this._source_job_id = _source_job_id;
            this._target_job_id = _target_job_id;
            this._property_table_name = _property_table_name;
            this._property_fields = _property_fields;
        }
        public override string ToolboxName => "Topographic Production Tools";

        public override string ToolName => "Copy Extended Properties";

        public override string CallName => "topographic.CopyExtendedProperties";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_source_job_id, _target_job_id, _property_table_name, _property_fields, _database_path, _updated_job_id];

        /// <summary>
        /// <para>Source Job ID</para>
        /// <para>The Job ID of the Workflow Manager (Classic) job that contains the properties to copy.</para>
        /// <para>包含要复制的属性的 Workflow Manager （Classic） 作业的作业 ID。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Source Job ID")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long? _source_job_id { get; set; }


        /// <summary>
        /// <para>Target Job ID</para>
        /// <para>The Job ID of the target job that will have its properties updated.</para>
        /// <para>将更新其属性的目标作业的作业 ID。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Target Job ID")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long? _target_job_id { get; set; }


        /// <summary>
        /// <para>Properties Table Name</para>
        /// <para>The name of the extended properties table that will be updated.</para>
        /// <para>将要更新的扩展属性表的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Properties Table Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _property_table_name { get; set; }


        /// <summary>
        /// <para>Property Fields</para>
        /// <para>The properties to be copied from the source job to the target job.</para>
        /// <para>要从源作业复制到目标作业的属性。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Property Fields")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _property_fields { get; set; }


        /// <summary>
        /// <para>Input Database Path</para>
        /// <para>The Workflow Manager (Classic) database connection file (.jtc) that contains the job information. If no connection file is specified, the current default Workflow Manager (Classic) database will be used.</para>
        /// <para>包含作业信息的 Workflow Manager （Classic） 数据库连接文件 （.jtc）。如果未指定连接文件，则将使用当前默认的 Workflow Manager （Classic） 数据库。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Database Path")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _database_path { get; set; } = null;


        /// <summary>
        /// <para>Updated Job ID</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Job ID")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public long _updated_job_id { get; set; }


        public CopyExtendedProperties SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}